package com.yidu.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yidu.common.Tools;
import com.yidu.dao.ListenSupplierMapper;
import com.yidu.domain.ListenSupplier;
import com.yidu.service.ListenSupplierService;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jiangyu
 * @since 2018-11-27
 */
@Service
public class ListenSupplierServiceImpl implements ListenSupplierService {
	
	@Resource
	ListenSupplierMapper dao;

	@Override
	public List<ListenSupplier> findSupplier(Map<String, Object> map) {
		 
		return dao.findSupplier(map);
	}

	@Override
	public int findSupplierCount(Map<String, Object> map) {
		 
		return dao.findSupplierCount(map);
	}
	/**
	 * 增加
	 */
	@Override
	public void insertSelective(ListenSupplier su) {
		su.setSuId(Tools.getRandomString());
		dao.insertSelective(su);
	}
	/**
	 * 修改
	 */
	@Override
	public void updateByPrimaryKeySelective(ListenSupplier su) {
		dao.updateByPrimaryKey(su);
	}
	
	/**
	 * 根据ID查询所有
	 */
	@Override
	public ListenSupplier selectID(String id) {
		return dao.selectID(id);
	}

	@Override
	public int updatei(String id) {
		return dao.updatei(id);
	}
}
